mudbox::MeshGrid Class Reference
#include <mesh.h>
Inheritance diagram for mudbox::MeshGrid:
[legend]
List of all
members.
Detailed Description
The MeshGrid class is an interface
for dividing the surface of a mesh to grids.
A grid is a collection of quad faces over the surface in a grid
pattern with the size of 1x1, 2x2, 4x4, 8x8 ... This class is
responsible to suply a list of grids on the surface with the
following rules:
1. The grids should be disjoint, one face can only belong to one
grid and no more. 2. These grids should cover the whole
surface.
This interface is used by Mudbox when it is rendering meshes
with high polygon counts using level of detail. This object is
always created as the child of the mesh object, so the MeshGrid object can
obtain a pointer to the mesh by calling TreeNode::Parent().
If you need to control the algorithm by which these grids are
created, you can override this class in a plug-in, and replace
Mudbox's version, which is in the plugin called "MeshGrid". To
create your own:
1. Write a plug-in that defines your own class derived from
MeshGrid.
2. Delete the existing MeshGrid plugin, and copy
yours into the plug-in folder.
On OSX, this plugin is found in the Mudbox 2009 package, under
Contents>MacOS>plugins. On the PC, it is found in the
work dir folder, under "plugins"
|
Public Member Functions
|
virtual const mudbox::ClassDesc
* |
RuntimeClass (void)
const |
virtual unsigned int |
MeshGridCount (void)
const |
|
This function should return the number of
grids.
|
virtual unsigned int |
MeshGridLevel (unsigned int
iMeshGridIndex) const |
|
This function returns the level of the
specified grid.
|
virtual unsigned int |
MeshGridFaceIndex (unsigned
int iMeshGridIndex, unsigned int iX, unsigned int iY) const |
|
This function returns the index of faces
which are forming a specific grid.
|
virtual unsigned int |
MeshGridVertexIndex
(unsigned int iMeshGridIndex, unsigned int iX, unsigned int iY)
const |
|
Returns the index of vertices for a grid.
|
virtual unsigned int |
MeshGridTCIndex (unsigned
int iMeshGridIndex, unsigned int iX, unsigned int iY) const |
|
Returns the texture coordinate index of the
vertices in the grid.
|
virtual unsigned int |
MeshGridIndexByFaceIndex
(unsigned int iFaceIndex) const |
|
This function returns the grid index which
contains the specified face.
|
Static Public Member Functions
|
const mudbox::ClassDesc
* |
StaticClass (void) |
mudbox::Node
* |
CreateInstances (unsigned
int iCount=1) |
Member Function Documentation
virtual const mudbox::ClassDesc*
mudbox::MeshGrid::RuntimeClass |
( |
void |
|
) |
const [inline,
virtual] |
|
mudbox::Node*
mudbox::MeshGrid::CreateInstances |
( |
unsigned int |
iCount =
1 |
) |
[static] |
|
virtual unsigned int
mudbox::MeshGrid::MeshGridCount |
( |
void |
|
) |
const [virtual] |
|
|
This function should return the number of grids.
|
virtual unsigned int
mudbox::MeshGrid::MeshGridLevel |
( |
unsigned int |
iMeshGridIndex |
) |
const [virtual] |
|
|
This function returns the level of the specified grid.
When the level of a grid is N then it's size is 2^N x 2^N
- Parameters:
-
iMeshGridIndex |
[in] The index of the grid |
|
virtual unsigned int
mudbox::MeshGrid::MeshGridFaceIndex |
( |
unsigned int |
iMeshGridIndex, |
|
|
unsigned int |
iX, |
|
|
unsigned int |
iY |
|
) |
const [virtual] |
|
|
This function returns the index of faces which are forming a
specific grid.
- Parameters:
-
iMeshGridIndex |
[in] The index of the grid |
iX |
[in] Horizontal position of the face within the grid |
iY |
[in] Vertical position of the face within the grid |
|
virtual unsigned int
mudbox::MeshGrid::MeshGridVertexIndex |
( |
unsigned int |
iMeshGridIndex, |
|
|
unsigned int |
iX, |
|
|
unsigned int |
iY |
|
) |
const [virtual] |
|
|
Returns the index of vertices for a grid.
- Parameters:
-
iMeshGridIndex |
[in] The index of the grid |
iX |
[in] Horizontal position of the vertex inside the grid |
iY |
[in] Vertical position of the vertex inside the grid |
|
virtual unsigned int
mudbox::MeshGrid::MeshGridTCIndex |
( |
unsigned int |
iMeshGridIndex, |
|
|
unsigned int |
iX, |
|
|
unsigned int |
iY |
|
) |
const [virtual] |
|
|
Returns the texture coordinate index of the vertices in the
grid.
- Parameters:
-
iMeshGridIndex |
[in] The index of the grig |
iX |
[in] Horizontal position of the vertex inside the grid |
iY |
[in] Vertical position of the vertex inside the grid |
|
virtual unsigned int
mudbox::MeshGrid::MeshGridIndexByFaceIndex |
( |
unsigned int |
iFaceIndex |
) |
const [virtual] |
|
|
This function returns the grid index which contains the
specified face.
- Parameters:
-
iFaceIndex |
[in] Index of the face |
|
mudbox::MeshGrid mudbox::MeshGrid
mudbox::MeshGrid mudbox::MeshGrid mudbox::MeshGrid mudbox::MeshGrid
mudbox::MeshGrid mudbox::MeshGrid mudbox::MeshGrid
mudbox::MeshGrid
mudbox::MeshGrid mudbox::MeshGrid
mudbox::MeshGrid mudbox::MeshGrid mudbox::MeshGrid mudbox::MeshGrid
mudbox::MeshGrid mudbox::MeshGrid mudbox::MeshGrid
mudbox::MeshGrid